Dynomotion

Group: DynoMotion Message: 5958 From: daveymahomh600e Date: 11/4/2012
Subject: Newbie Question - Program Structure
Hello All,

I am still uncertain with regard to the complete program structure when running a machine under KmotionCNC control and I am looking for some guidance.

My system is a 2-axis XY type and will use 3 phase brushless servos with a Kflop and SnapAmp.

My understanding is the init.c is used to configure the motors to run properly with the controller. Does this file continue to run while the system is in operation? I did mention newbie didn't I? The main reason I ask is that I need to build in an Estop safety watchdog loop and want to be sure this is the place to do it. There will also be limit switches and I suspect they too would reside in the same area?

Of course, after an Estop, there needs to be a way to re-stabilize (reset) the system and get it back on the rails, so to speak. Is this also the place to do this?

I realize there are many parts to the system and I am just trying to get it clear in my own head.

Thanks for your help.
DB
Group: DynoMotion Message: 5959 From: Tom Kerekes Date: 11/4/2012
Subject: Re: Newbie Question - Program Structure
Hi DB,

Yes.  That is basically all correct.  The Initialization program can initialize your system and simply terminate, or if you add a loop at the end it can remain in that loop forever (or until the system is reinitialized).  Re-initialization will abort the program and restart it from the beginning.  You can put the things that need to be performed continuously in the loop.  Things like EStop watching, MPG Jogging, etc can be placed in the loop.  Basic Limit switches can be configured in the KFLOP axis channel configuration so you don't normally need to do that yourself unless you need to do something special. 

HTH
Regards
TK